home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / CTBUtilities.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  4.3 KB  |  192 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CTBUtilities.a
  3. ;
  4. ;    Contains:    Communications Toolbox Utilities interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  21. __CTBUTILITIES__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  25.     include 'Memory.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30.  
  31.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  32.     include 'Dialogs.a'
  33.     ENDIF
  34. ;        include 'Errors.a'                                            ;
  35. ;        include 'Menus.a'                                            ;
  36. ;            include 'Quickdraw.a'                                    ;
  37. ;                include 'QuickdrawText.a'                            ;
  38. ;        include 'Controls.a'                                        ;
  39. ;        include 'Windows.a'                                        ;
  40. ;            include 'Events.a'                                        ;
  41. ;                include 'OSUtils.a'                                ;
  42. ;        include 'TextEdit.a'                                        ;
  43.  
  44.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  45.     include 'StandardFile.a'
  46.     ENDIF
  47. ;        include 'Files.a'                                            ;
  48. ;            include 'Finder.a'                                        ;
  49.  
  50.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  51.     include 'AppleTalk.a'
  52.     ENDIF
  53.  
  54. ;    version of Comm Toolbox Utilities    
  55. curCTBUVersion                    EQU        2
  56. ;    Error codes/types    
  57. ctbuGenericError                EQU        -1
  58. ctbuNoErr                        EQU        0
  59.  
  60. ; typedef OSErr             CTBUErr
  61.  
  62. chooseDisaster                    EQU        -2
  63. chooseFailed                    EQU        -1
  64. chooseAborted                    EQU        0
  65. chooseOKMinor                    EQU        1
  66. chooseOKMajor                    EQU        2
  67. chooseCancel                    EQU        3
  68.  
  69. ; typedef unsigned short     ChooseReturnCode
  70.  
  71. nlOk                            EQU        0
  72. nlCancel                        EQU        1
  73. nlEject                            EQU        2
  74.  
  75. ; typedef unsigned short     NuLookupReturnCode
  76.  
  77. nameInclude                        EQU        1
  78. nameDisable                        EQU        2
  79. nameReject                        EQU        3
  80.  
  81. ; typedef unsigned short     NameFilterReturnCode
  82.  
  83. zoneInclude                        EQU        1
  84. zoneDisable                        EQU        2
  85. zoneReject                        EQU        3
  86.  
  87. ; typedef unsigned short     ZoneFilterReturnCode
  88.  
  89. ;    Values for hookProc items        
  90. hookOK                            EQU        1
  91. hookCancel                        EQU        2
  92. hookOutline                        EQU        3
  93. hookTitle                        EQU        4
  94. hookItemList                    EQU        5
  95. hookZoneTitle                    EQU        6
  96. hookZoneList                    EQU        7
  97. hookLine                        EQU        8
  98. hookVersion                        EQU        9
  99. hookReserved1                    EQU        10
  100. hookReserved2                    EQU        11
  101. hookReserved3                    EQU        12
  102. hookReserved4                    EQU        13
  103. ;    "virtual" hookProc items    
  104. hookNull                        EQU        100
  105. hookItemRefresh                    EQU        101
  106. hookZoneRefresh                    EQU        102
  107. hookEject                        EQU        103
  108. hookPreflight                    EQU        104
  109. hookPostflight                    EQU        105
  110. hookKeyBase                        EQU        1000
  111.  
  112. ;    NuLookup structures/constants    
  113. NLTypeEntry             RECORD    0
  114. hIcon                     ds.l   1        ; offset: $0 (0)
  115. typeStr                     ds.b   33        ; offset: $4 (4)
  116.                          ORG 38
  117. sizeof                     EQU *            ; size:   $26 (38)
  118.                         ENDR
  119.  
  120. ; typedef struct NLTypeEntry  NLTypeEntry
  121. ; typedef NLTypeEntry         NLType[4]
  122. NBPReply                 RECORD    0
  123. theEntity                 ds     EntityName ; offset: $0 (0)
  124. theAddr                     ds     AddrBlock ; offset: $66 (102)
  125. sizeof                     EQU *            ; size:   $6A (106)
  126.                         ENDR
  127.  
  128. ; typedef struct NBPReply     NBPReply
  129. ;
  130. ; pascal CTBUErr InitCTBUtilities(void)
  131. ;
  132.     IF ¬ GENERATINGCFM THEN
  133.         Macro
  134.         _InitCTBUtilities
  135.             move.w    #$0401,-(sp)
  136.             dc.w     $204F
  137.             dc.w     $A08B
  138.             dc.w     $544F
  139.         EndM
  140.     ELSE
  141.         IMPORT_CFM_FUNCTION    InitCTBUtilities
  142.     ENDIF
  143.  
  144. ;
  145. ; pascal short CTBGetCTBVersion(void)
  146. ;
  147.     IF ¬ GENERATINGCFM THEN
  148.         Macro
  149.         _CTBGetCTBVersion
  150.             move.w    #$0405,-(sp)
  151.             dc.w     $204F
  152.             dc.w     $A08B
  153.             dc.w     $544F
  154.         EndM
  155.     ELSE
  156.         IMPORT_CFM_FUNCTION    CTBGetCTBVersion
  157.     ENDIF
  158.  
  159. ;
  160. ; pascal short StandardNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, NBPReply *theReply)
  161. ;
  162.     IF ¬ GENERATINGCFM THEN
  163.         Macro
  164.         _StandardNBP
  165.             move.w    #$0406,-(sp)
  166.             dc.w     $204F
  167.             dc.w     $A08B
  168.             dc.w     $544F
  169.         EndM
  170.     ELSE
  171.         IMPORT_CFM_FUNCTION    StandardNBP
  172.     ENDIF
  173.  
  174. ;
  175. ; pascal short CustomNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, long userData, short dialogID, ModalFilterUPP filter, NBPReply *theReply)
  176. ;
  177.     IF ¬ GENERATINGCFM THEN
  178.         Macro
  179.         _CustomNBP
  180.             move.w    #$0407,-(sp)
  181.             dc.w     $204F
  182.             dc.w     $A08B
  183.             dc.w     $544F
  184.         EndM
  185.     ELSE
  186.         IMPORT_CFM_FUNCTION    CustomNBP
  187.     ENDIF
  188.  
  189.     IF OLDROUTINENAMES  THEN
  190.     ENDIF
  191.     ENDIF ; __CTBUTILITIES__
  192.